﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace EduProject.Areas.User.Controllers
{
    public class AuthenticationControllor : Controller
    {
        //
        // GET: /User/AuthenticationControllor/
        public ActionResult Index()
        {
            return View();
        }
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.HttpContext.Session["username"]==null)
            {
                filterContext.Result = new RedirectToRouteResult("Home", new RouteValueDictionary { { "Login", Request.Url.ToString() } });
            }
            base.OnActionExecuting(filterContext);
        }
	}
}